package sk.mka.phd.googleagent.ngram.statistics;

import org.apache.log4j.Logger;
import sk.mka.phd.googleagent.ngram.CreateNGramImpl;
import sk.mka.phd.googleagent.ngram.IGoogleNgram;
import sk.mka.phd.googleagent.query.AjaxGoogleQuery;
import sk.mka.phd.googleagent.statistics.IGoogleStatisticsAgent;
import sk.mka.phd.googleagent.statistics.StatisticsAgentImpl;
import sk.mka.utils.constants.Separator;

/**
 * FIXME trouble with loading properties file in other module
 * The goal of this class is create ngram (bigram, trigram). When file with ngrams is ready, program will starting getting statistics
 * from internet. Words have to be in quotes. 
 * @author bracek
 * @date Jul 7, 2010
 */
public class CallStatisticsAfterNgramApp {

    protected final static Logger log = Logger.getLogger(CallStatisticsAfterNgramApp.class);

    public static void main(String[] args) {

        //prepare ngram model
        final IGoogleNgram cretorAgent = new CreateNGramImpl(Separator.EMPTY_SPACE);
        cretorAgent.createNgramModel();

        final IGoogleStatisticsAgent googleStatisticsAgent = new StatisticsAgentImpl(new AjaxGoogleQuery());
        final NgramImpl agent = new NgramImpl(googleStatisticsAgent, " ");
        agent.doStatistics();
    }
}
